package com.superquan.selfstudybootmybatis.utils.email;

import org.apache.commons.lang3.StringUtils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class SendEmailTest {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//        String s="12.31.2021";
//        String[] split = s.split("\\.");
//        String newDate=split[2]+"-"+split[0]+"-"+split[1];
        String date="2022-03-26";

        Date parse = sdf.parse(date);
        if((new Date()).before(parse)){
            System.out.println("大于当前日期，未过期！");
        }else{
            System.out.println("小于当前时间，已过期！");
        }
        System.out.println(parse);
        int i=0;
        if(i<=0){
            System.out.println("yes");
        }else{
            System.out.println("no");
        }

//        SendEmailUtil.sendSimpleMailMessage("zhuwenquan@winchannel.net","测试邮件发送","使用smtp发送邮件。。。。");
    }
}
